<!DOCTYPE html>
<html>

<head>

    <meta charset="utf-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">

    <title>{$current['title']}-{$Think.CONFIG.sitename}</title>

    <link href="__PUBLIC__/static/css/bootstrap.min.css?v=3.3.5" rel="stylesheet">
    <link href="__PUBLIC__/static/css/font-awesome.min.css?v=4.4.0" rel="stylesheet">
    <link href="__PUBLIC__/static/css/animate.min.css" rel="stylesheet">
    <include file="Public/commoncss" />
    <link href="__PUBLIC__/static/css/plugins/datapicker/datepicker3.css" rel="stylesheet">
    <style type="text/css">
        .passwordStrength{
            margin-bottom: 5px;
        }
        .passwordStrength b{
            font-weight:normal;
        }
        .passwordStrength b,.passwordStrength span{
            display:inline-block;
            vertical-align:middle;
            line-height:16px;
            line-height:18px\9;
            height:10px;
        }
        .passwordStrength span{
            width:20%;
            text-align:center;
            background-color:#d0d0d0;
            border-right:1px solid #fff;
        }
        .passwordStrength .last{
            border-right:none;
        }
        .passwordStrength .bgStrength{
            color:#fff;
            background-color:#71b83d;
        }
    </style>
</head>

<body class="gray-bg top-navigation">
<div id="wrapper">
    <div id="page-wrapper" class="gray-bg">
        <div class="row border-bottom white-bg">
            <include file="Public/header" />
        </div>
        <div class="wrapper wrapper-content">
            <div class="row">
                <div class="col-sm-3">
                    <div class="ibox float-e-margins">
                        <include file="Public/deptnav" />
                    </div>
                </div>
                <div class="col-sm-9 animated fadeInRight">
                    <div class="ibox float-e-margins">
                        <div class="ibox-title">
                            <h5>{$current['title']}</h5>
                        </div>
                        <div class="ibox-content">
                            <div class="row">
                                <form class="form-horizontal m-t"  action="{:U('update')}" id="myForm">
                                    <div class="col-sm-12">
                                        <label class="col-sm-2 control-label"> 标 题 ：</label>
                                        <div class="col-sm-7">
                                            <input type="text"  name="title" class="form-control" placeholder="请填写标题！" datatype="s2-255" nullmsg="请填写标题！" errormsg="标题至少2个字符,最多10个字符！" maxlength="10" autocomplete="off">
                                            <span class="help-block m-b-none Validform_checktip"></span>
                                        </div>
                                        <div class="col-sm-3" id="data_1">
                                            <input type="text"  name="end" class="form-control input-group date" placeholder="请填结束时间！"  value="" autocomplete="off" readonly>
                                            <span class="help-block m-b-none Validform_checktip"></span>
                                        </div>
                                    </div>

                                    <div class="col-sm-12">
                                        <label class="col-sm-2 control-label"> 内容 ：</label>
                                        <div class="col-sm-10" id="data_1">
                                            <textarea name="content" id="editor" style="width:100%;height:400px;visibility:hidden;" placeholder="可以是网址、联系人、图片、文章等！"></textarea>
                                            <span class="help-block m-b-none Validform_checktip"></span>
                                        </div>
                                    </div>

                                    <div class="col-sm-8 col-sm-offset-3">
                                        <button class="btn btn-primary" type="submit">保存内容</button>
                                        <span class="help-block m-b-none " id="Tips"></span>
                                    </div>

                                </form>

                            </div>
                        </div>
                    </div>

                </div>
            </div>
        </div>
        <include file="Public/footer" />
    </div>
</div>
<include file="Public/commonjs" />
<script src="__PUBLIC__/static/js/bootstrap.min.js?v=3.3.5"></script>
<script src="__PUBLIC__/static/js/content.min.js?v=1.0.0"></script>
<script src="__PUBLIC__/static/js/plugins/validate/Validform_v5.3.2.js"></script>
<script src="__PUBLIC__/static/js/plugins/passwordStrength/passwordStrength-min.js"></script>
<script src="__PUBLIC__/static/js/plugins/datapicker/bootstrap-datepicker.js"></script>
<script charset="utf-8" src="__PUBLIC__/kindeditor/kindeditor-min.js"></script>
<script charset="utf-8" src="__PUBLIC__/kindeditor/lang/zh_CN.js"></script>
<script>
    $(document).ready(function() {
        var editor = KindEditor.create('#editor',{
            uploadJson : '/Public/kindeditor/php/upload_json.php',
            fileManagerJson : '/Public/kindeditor/php/file_manager_json.php',
            allowFileManager : true,
            afterBlur:function(){this.sync();}
        });
        $("#myForm").Validform({
            tiptype:function(msg,o,cssctl){
                if(!o.obj.is("form")){
                    var objtip=o.obj.siblings(".Validform_checktip");
                    cssctl(objtip,o.type);
                    objtip.text(msg);
                }else{
                    if(msg == '操作成功！'){
                        window.location.href="{:U('Inform/index')}";
                    }else{
                        var objtip=o.obj.find("#Tips");
                        cssctl(objtip,o.type);
                        objtip.text(msg);
                    }
                }
            },
            ajaxPost:true
        });

        //日期控件
        $("#data_1 .input-group.date").datepicker({
            todayBtn: "linked",
            keyboardNavigation: !1,
            forceParse: !1,
            calendarWeeks: !0,
            autoclose: !0
        })

    })
</script>
</body>

</html>